<div class="sm-pop">
    <div id="list1">
    </div>
</div>
<script>
    $(function () {
        var params1 = {};

        getlist1();

        $("#list1").on("click","li",function () {
            $(this).addClass("active").siblings(".active").removeClass("active");
        });
        //多图文
        function getlist1(params) {
            if (params && params.page) {
                params1.page = params.page;
            } else {
                if (params) {
                    params1.title = params.title;
                    params1.start = params.start;
                    params1.end = params.end;
                }
                params1.page = 1;
                params1.pageSize = 4;
            }
            params1.multType = 2;
            $.ajax({
                url: '/msgnews/list',
                data: params1,
                success: function (result) {
                    if (result.success && result.page && result.page.total > 0) {
                        //渲染列表
                        smartAui.renderHtml({
                            targetId: 'list1',
                            template: "multiple-list",
                            htmlData: result,
                            callBack: function () {
                                if (result.page.total > 4) {
                                    //初始化分页
                                    initPage(result.page, getlist1);
                                }
                            }
                        });
                    } else {
                        $('#list1').html("<p class='nothing'>没有查询到相关数据！</p>");
                    }
                },
                error: function () {
                    $('#list1').html("<p class='nothing'>没有查询到相关数据！</p>");
                }
            })
        }

    });
</script>